package pro.wy.dynamicproxy.test;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;

import pro.wy.dynamicproxy.handler.WorkHandler;

public final class Proxy0 extends Proxy {
	private static Method m3;

	protected Proxy0(InvocationHandler h) {
		super(h);
	}

	public final void work() {
		System.out.println("我执行了Proxy0中的work方法-------------------------------------------");
	}

	static {
		try {
			m3 = Class.forName("pro.wy.dynamicproxy.interfaces.People").getMethod("work",
					new Class[] { Class.forName("java.lang.String") });
		} catch (NoSuchMethodException localNoSuchMethodException) {
			throw new NoSuchMethodError(localNoSuchMethodException.getMessage());
		} catch (ClassNotFoundException localClassNotFoundException) {
			throw new NoClassDefFoundError(localClassNotFoundException.getMessage());
		}
	}

	public static void main(String[] args) {
		Proxy0 a = new Proxy0(new WorkHandler());
	}
}